home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1987 March / Ahoy_Magazine_87-03_1987_Double_L.d64 / Time Converter (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  324b  |  13 lines

  1. 0 print"[147]":poke53280,0:poke53281,0:poke646,1
  2. 1 rem commodares problem #35-3:
  3. 2 rem     time converter
  4. 3 rem solution by
  5. 4 rem     howard  g. reiser
  6. 5 rem
  7. 10 input"number of hours in decimal form";hx
  8. 20 h$=str$(int(hx))
  9. 30 s=3600*(hx-int(hx))+.5
  10. 40 m=int(s)/60:m$=" :"+str$(int(m))
  11. 50 s$=" :"+str$(int((m-int(m))*60+.5))
  12. 60 print hx;" hours = ";h$;m$;s$
  13.